// 设置token键值
const TokenKey = 'ACCESS-TOKEN'
    /**
     * 获取token
     **/
const getToken = () =>{
    return uni.getStorageSync(TokenKey)
}
/**
 * 设置token
 **/
const setToken = (token) => {
    return uni.setStorageSync(TokenKey,token);
}
/**
 * 移除token
 **/
const removeToken = () => {
    return uni.removeStorageSync(TokenKey);
}


const UserInfoKey = 'USER-INFO'

    /**
     * 获取用户信息
     **/
    const getUserInfo = () =>{
      return uni.getStorageSync(UserInfoKey)
  }
  /**
   * 设置用户信息
   **/
  const setUserInfo = (userinfo) => {
      return uni.setStorageSync(UserInfoKey,userinfo);
  }
  /**
   * 移除用户信息
   **/
  const removeUserInfo = () => {
      return uni.removeStorageSync(UserInfoKey);
  }

export { getToken, setToken, removeToken,getUserInfo,setUserInfo,removeUserInfo }
